package plg.grupo1.Lexico.StateMachineHierarchy;

import plg.grupo1.Lexico.TokenHierarchy.TokenDelimitador;

public class State21 implements State{
	
    private static State21 INSTANCE = null;
	private State21(){}
	
    private synchronized static void createInstance() {
        if (INSTANCE == null) INSTANCE = new State21();
    }
    
    public static State21 getInstance() {
        if (INSTANCE == null) createInstance();
        return INSTANCE;
    }
    
	public void goNext(){
		Contexto.addToken(new TokenDelimitador(Contexto.getLexema()));
		Contexto.clearLexema();
		Contexto.moveToPreviousChar();//retrocede puntero buffer
		Contexto.setCurrentState(State0.getInstance());
	}
}
